package comfour;

import comfour.util.BaseJdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;

public class Demo3 {
    public static void main(String[] args) throws Exception {
        //数据库连接
        String sql="update student set studentName=?,loginPwd=? where studentNo=?";
        Object[] objects = new Object[3];
        objects[0]="DDDDD";
        objects[1]="323232";
        objects[2]=1021;
        int i = BaseJdbc.BaseUpdate(sql,objects);
        if(i>0){
            System.out.println("修改成功");
        }
    }
}
